﻿@model SmallJob.Model.EmailFormat
@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Edit</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm("Save", "Email", FormMethod.Post))
{
    <input type="hidden" name="id" value="@Model.ID"/>
    <input type="text" name="title" value="@Model.Title" placeholder="Title Format"/> 
    <br />
    <textarea name="des" placeholder="Format Description">@Model.Description</textarea>
    <br />
    <input type="text" name="subject" value="@Model.SubjectMail" placeholder="Subject Mail"/>
    <textarea id="txtBody" name="body" rows="6" style="width: 585px; height: 300px">@Model.BodyEmail</textarea>
    <input type="submit" class="btn" value="Save" />
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
<script src="@Url.Content("~/Content/plugin/ckeditor/ckeditor.js")"></script>
<script>
    //$(document).ready(function () {
    //    $('#txtBody').wysihtml5({
    //        "font-styles": false
    //    });
    //});

    CKEDITOR.replace('txtBody', {
        fullPage: true,
        allowedContent: true,
        extraPlugins: 'wysiwygarea'
    });
</script>